<template>
  <div class="goodinfo">
    <div class="v-align-c">
      <div class="goodinfo-img width-123 height-123">
        <img v-if="good.goodsImageUrl" class="width-123 height-123" :src="good.goodsImageUrl" alt="">
      </div>
      <div class="goodinfo-content">
        <div>
          <div class="goodinfo-content__title">{{good.title}}</div>
          <span class="goodinfo-content__icon" v-if="good.wholesaleNum">{{good.wholesaleNum}} {{good.unit}}起批</span>
        </div>
        <div class="goodinfo-content__price">
          <div class="color-ff">
            <span class="font-15">￥</span>
            <span class="font-24">{{good.wholesalePrice}}</span>
          </div>
          <div class="color-a8 font-12">批发价</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    good: {
      type: Object,
      default: {}
    }
  }
}
</script>
<style lang="less" scoped>
.color-a8{
  color: #A8A8A8;
}
.color-ff{
  color: #FF5742;
}
.goodinfo{
  border-radius: 5px;
  background: white;
  margin-top: 10px;
  &-content{
    height: 123px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 15px 10px 10px;
    line-height: 1;
    box-sizing: border-box;
    flex: 1;
    &__title{
      font-size: 16px;
      height: 20px;
      line-height: 1.3;
      font-weight: bold;
      overflow:hidden;
      text-overflow:ellipsis;
      display:-webkit-box;
      -webkit-line-clamp:1;
      -webkit-box-orient:vertical;
      word-break:break-word;
      margin-bottom: 8px;
    }
    &__icon{
      background: rgba(254, 115, 41, .12);
      color: #FF7328;
      padding: 0px 4px;
      font-size: 12px;
      border-radius: 2px;
    }
    &__price{
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
    }
  }
}
</style>
